java.nio.file is new in Java 7. It would be better if we could do this without the Path and Paths class so that we can support Java 6.