Fix for FileNotFound exception when file is missing

Reverting the use of toRealPath back to getCanonical file and File.get().
I also changed the initialization of getDocumentContent to only call
isHidden after first confirming that the file actually excists.
4 files changed