fixed bug and added clean_path that does rel paths

the bug was pointed out by kirbyfan64: not all the paths (outputs
and dependencies) would be normalized before check_for_deps_in_outputs
was called and it caused improper building of the edges of the
dependency graph.