Made propertyWithPath a stand-alone function

Made propertyWithPath a stand-alone function instead of extending Object.prototype. Extending Object.prototype is considered bad practice: http://stackoverflow.com/q/22019375/257533