(maint) Add debugging when loading ruby dynamic library

Also testing code.