scripts: Shell script cosmetics
scripts: More comprehensible variable name
scripts: Ignore newlines in data files
scripts: Exit if unit cannot be extracted from filename