Bugfixes for running PyXRD on headless (GTK-less) HPC infrastructure