Pass input file's directory as live-server's root
:warning: This PR includes changes from #20, so it should be reviewed and merged before this one.
This fixes broken relative links when previewing files outside of the current working directory.
Example: Open a terminal and cd to the parent directory of your clone of this repo, run nvim nvim-markdown-preview/README.md, and :MarkdowPreview<CR>. Notice how the screenshot is missing.
This happens because the generated HTML's (temporary) directory is mounted at the live server's /. This is required for the HTML file to be accessible to live-server, but it also means that relative links are broken, because the temp directory doesn't contain linked resources.
Previewing files in the current directory happens to work, because live-server's root is the current directory, which live-server
apparently falls back to when it can't find something in the directory mounted at /. (The server root and / mounts both appear to be mapped.)
This fallback functionality is leveraged to fix relative resource links by setting the live-server root to the directory of the input file.