Fixed relative path issue

Now doing relative path from file's directory rather than file itself.