Clean up path helpers.

* Store app and API paths in localStorage.
* Separate environment specific configuration.
* Clean up browser/node detection.