Reverse the split path array a second time to put it back in the correct order (so multi-level directory structures are processed correctly).
Merge pull request #1 from jkrehm/master

Multi-level directories are out of order because of array.reverse()