fix for handling absolute directories