Accept dir-/basename due to edge cases like "/" and "foo"