Fix tests

- set classpath to find NativeInvocationHandler
- fix signature checking test to pass when it throws the correct
  exception
- throw a distinguishable exception for bad signatures