fixing compilation for WIN32
implementing Path::dirpath()