Fix ADD caching issue with . prefixed path

And ADD tests for that case.