Adding sudo integration points

I recently had an exchange with mpapis on RVM's IRC channel, and I'd like for other people to not lose an hour like I did.

Let me know how this can be improved!