fix repository detection on case-insensitive filesystem

I noticed `apm publish` was failing for one of my projects and tracked it down to this condition because the case of the reported paths differed for some reason. This fixes it.