New RPATH logic (ready for review)



<!---
@huboard:{"order":669.5,"custom_state":""}
-->

It's better to subclass from Exception, not BaseException. Only very low-level exceptions don't subclass from Exception.