do_thirdput creates directory if needed

Patch per Mike suggestion.