fixes, end-to-end tests

@feiranwang : Don't we create some directory in ${groundingPath}? Who is removing tmp, for example?