Move implementation to module, for testability (close gh-4).
Existence check by require instead of use to use return value simply.
Add -r and -u options.
Add documentation (close gh-1).