Fix to work with absolute directories.