Fixes for nodejs deployment

Fixes #1056 for majority of WAWS cases.
Fixes the issue of files with the same name as the start-up file in repo.