implemented 1st 2 suggestions by http://www.reddit.com/user/ottre which is to use (()) instead of [ ] for arithmetic and to use find instead of ls when deleting files