fix type introduced in commit #bbdec95b

Also makes the code deal correctly with non-canonicalized
filename dependencies.