So I got this script from the internet that was supposed to make my life easy… but a one day job ended up becoming a 3 day job and this was why:

But… (wait for it)

So in a nutshell: 
Don’t forget to sanitise your results before comparisons…