Use file_put_contents/file_get_contents instead of fwrite/fread
Use file_put_contents/file_get_contents instead of fwrite/fread

Much simpler this way. Also does away with the need to check for empty
output, although now we have to check the return value of
`launch_editor_for_input` strictly against false, since its possible for
it to return an empty string now (editing a post and deleting all the
content).

wp-cli/wp-cli,wp-cli/wp-cli