Emulating part of the bash find command with Python.