Fix bug in relative path resolution