Apparently this is a bit of an issue with PowerGui, if you are running this through the PowerGui editor then try running it by pushing Ctrl + F5 rather than just F5 or pushing the play button. (Thanks LucD)