Fix perms, pass tests on ruby 2.0