Updated file renaming function to work better.

Now the function goes through every folder recursively to rename
everything.