Remove py cache files in one go when testing

When running `run_tests.sh` on a Mac the second find exists with a
non-zero status (but successfully removes the directories) if an exec is
run per found directory. This change runs a single rmdir for all found
directories and does the same for the pyc files.