Swap to SPL Exceptions

Fixes #1 and includes Pull request #2

However this uses SPL's invalidargumentexception (it turns out a lot of the places raiseError is used is a good fit). Unit tests seem happy.