Add priority setting functionality.
Fix error handling and only set priority if asked.
Add errno and error string to error message if we cannot set the priority. Should most likely be EACCES.