Improved file reading, moved test files

Read file method in algorithm is now more comprehensive in reporting
errors -- although it is much harder to read now. Will definitely need
to look into refactoring it again.