Configure —with-uploadscript

- omg test all the things
- define UPLOAD_PIPE_FILE and UPLOAD_PIPE_LOCK to make sure
  that they can get created as a non-root user
- fix rubocop warnings