add better linux support for allowing restore; fix to support ruby 1.9.x; add tests/coverage