Fixed Tests

Added npm test to package.json
Fixed writeFileSync to proper path