fixed bug in removedir