Corrected out of memory error with zero-sized files

According to the issue I made, there is the correction: added a test to return the array if the file's length is 0