import files: create dir if not exists

(copied from r4)