nsq_to_file: Set proper permissions on new directories. Fixes #344.