code: def check_input(self, flag, path):
          
          path = os.path.abspath(path)
          if os.path.exists(path):
              if flag:
                  self.args.append(flag)
              self.args.append(path)
          else:
              utils.die("input file for flag '%s' does not exists:\n  %s" % (
                        flag, path))
docs: turns path into an absolute path and checks that it exists, then
          appends it to the args using the given flag (or none).