#91 supporting flag 'shared' to setup tmp dir