Jruby fixes

Here are some fixes I had to do to get dullard working with jruby.

There isn't great documentation and no tests yet, I may do that later on. Let me know what you think.