Properly determine caller's dirname on Windows

The path includes the drive letter followed by :, which is the separator
we use to split the path.