Fix bug that caused script to halt on folders with spaces in titles