Avoid directory- and filename ambiguity

As suggested by @globin