Fix issue where production environment is not detected properly.

* Refactor still necessary for path helper.