Add messages to all preconditions. Allow null file paths through.

Closes #58.