Rewrite 'check' interpreter.

Added support for checking the correct file owner.