Add missing import

Fixes bug 3174.
Ingore some pytest related cache dirs