Fixed file read bugs, directory print bug, cleanup

-Fixed a few bugs with file read: closing file sooner, unauthorized
permissions issue, file in use error.
-Fixed directory printout issue where a one packet directory would print
out entire payload, including null bytes.
-Cleaned up usings, a few comments/debug printlines.