Add code from StackOverflow 425529 to attempt to handle user permissions errors in unicorn.