Fix wrong path when using basePath

Also renamed variables "files"/"file" -> "projectFiles"/"projectFile" to avoid confusion.
Merge pull request #1 from teohhanhui/patch-1

Fix wrong path when using basePath