replace path to dir