Fixed bug conversion of paths to JS objects + added testcase
Fixed bug conversion of paths to JS objects + added testcase