Fix relpath exception

Using code from https://github.com/vim-pandoc/vim-pandoc/pull/102