fixed removeFolder erroneously treating result as an array