Stronger logic

Logic for testing if required input files are present is strong and
more robust (hopefully).