attr: Cleanup the containing dir logic