Fix regex to consider upper directory like ../../test/foo/bar