Create tmp/ and its subdirs automatically (closes #275, refs #263)