Updated: Now checks to see if directory/file exists!