Add optional 'mode' argument to --allow-uploads flag, allowing user to toggle per_page_uploads.

See #791. New pull request with amended commit message.