[5.0] Add "realpath" To app_path()

Fix issues when comparing paths for namespace detection on Windows environments.