properly check get_file_contents() return value
add trailing newline to error messages
Merge pull request #2 from glensc/master

reports error for empty files