Fixed a small bug that allowed you to attempt to open a directory as a file(Unfortunately it throws an exception).