Refactored getPhoneGapPath