Fix tidyPath to work as specified in Javadoc
Add more comprehensive tidyPath unit tests