There are two main ways to do this
1) set 'autochdir'. This will automatically change directory to the
directory of the containing file so that "./" will always refer to
the directory of the current file.
2) use expand() or fnamemodify() with the various available modifiers
(":help filename-modifiers"). In this case you want either :p for the
absolute path or :~ for the path relative to your home directory.
-tim