Moved path determination into determineAppLocation.

The variable path, which was calculated based on the appLocation
immediately after calling determineAppLocation has now been moved to
being calculated in determineAppLocation and stored to the window
object.  This variable currently just gets passed around a bunch and is
actually better suited to a global variable.