use a for loop rather than complex regex/reversing/replacing

While preparing #23 I noticed this massive comment, and the complex regexing + array manipulation. Since I prefer string paths over arrays. I figured I might take a stab at writing this out in a simpler and [far more efficient](http://jsperf.com/path-as-array-from-dot-notated-string) way.

Hope you don't mind!