Fix unintelligible error when importing empty file

IO#read returns nil for an empty file if given a length argument, which
caused a stack trace when attempting to import a file instead of a
useful error 

### Verification steps

- [x] `touch empty_file` and then attempt to `db_import` it.
- [x] see useful error message instead of stack trace