Fixed recursion problem, script now works as advertised. Finally using markdown for README.