move files around, and create output directory if not exists.