t/noenv.t fix error on Win32

Use File::Spec::splitpath to portably get the directory portion of a path and
use File::Spec::canonpath to portably compare file paths.