Fixed test installation in setup.py and ensured tests are only installed in non-production environments.