Fixes failures when tests are invoked from different paths.
Implements tools for preprocessing the arguments to user-facing functions.