Fix typescript dev mode watcher grunt task

Fix some issues in typescript dev mode watcher that detects changes in typescript files and automatically complies it to javascript and reloads the page). For dev mode, the 'grunt serve' task now compiles all the typescript properly (and 'grunt build' compiles for webapp builds).