Fixed Java 1.6 compatibility issue: use handwritten getRelativePath() instead of using java 1.7's Path.