[#4001] Added explicit check and error message when creating a file if parent doesn't exist
This was giving the regular File.open error for non-existent parent, resulting
in a message citing the non-existence of the file as the reason ensure can't be
changed from absent to present. Now it properly states that the parent
directory is missing.