relocation: a fix for `@depot` tag inserting and extra tests (#51920)
#51892 caused depots to be skipped when inserting the `@depot` tags,
because it assumed that `isdirpath(path) == false` means that `path` is
not a directory.
This is fixed here while preserving the path normalization introduced
there.
Furthermore, this adds tests as requested here
https://github.com/JuliaLang/julia/pull/51892#issuecomment-1781754004