Updated path handling in application.js

Change-Id: I28825774d3ebc21b733bdb053051b967ef4cef0e