Update app.js

fix "TypeError: Arguments to path.join must be strings" error