clean up keep_symlinks for file.recurse

fix #10809
Clean up some pep8
Use dict() compatible with python 2.6
Merge pull request #10813 from gtmanfred/keep_symlinks

Keep symlinks