Automatically set base for files.

If the input is not stdin or a http/https URL, then set the base as the
full input file path.