Make the file-atom constructor ensure the parent directories all exist.

This fixes an infinite loop when trying to commit to a file whose path
doesn't exist.