Writes the CWD to a file (and emits the OSC7) at startup and when the directory changes. This is
used by a function in fish-shell to automatically cd to the cwd on nvim exit.
Code layout has been changed and improoved. Annotations are added for documentation. Automated through utility functions and data tables
BREAKING CHANGE: Tested from clean. Now properly uses LuaRocks to install dependencies.