Fixing issue with path not properly handling it when it was undefined
Adding sample test for defineProperty