Fix unit test failing because sort(Collection) has been removed
Fix ResourceGroovyMethods not handling UTF16LE/BE properly