let in_hg() handle nested directories