Adding 'dir' param to allow user to specify a directory for files to go in, but still get a random file name.