Add select case preservation for windows paths

Fixes #2677