Fixes bug where bundle fails to find java platform gems

Combination of work by @bruceadams and @edmundoa to fix problems described in https://github.com/geminabox/geminabox/issues/139 and https://github.com/geminabox/geminabox/pull/111