protect against case where file exists but is empty

Minor change here. Thanks for the great gem!