Correctly support loading of files in nodejs