pwd portability fix