added rmdir,truncate and fixed couple of bugs