remove extra slash from base_name for Windows paths