Specify type of executable when uploading.
Cleanup executable code.
Use 'mktemp -d' instead of abusing mkstemps to create tempdir.