Update DiskSpace.java

Made a check to be sure that we are opening a file. Also, am having a hard time using gihubs search function. I am currently trying to find if we have a getBytes() method made anywhere that works with the object that DiskSpace.write() asks for. I'll post this in the group chat to see what the thoughts are.