Fix single run of encryption tests and usages of uniqid() and fopen()
Correctly close handle of directory when listing certificates
Make it possible to cleanPath() absolute Windows paths