more elegant way of getting abs. root dir. kudos: Elyézer Mendes Rezende