Add xdist detection in setup.py test command

Closes #298