Refactoring functions to helpers.
Adding a fileExists helper and organizing.
bad should exit abnormally when a required argument is missing.
closes #5: Checking needed for --exec.