Fix FirefoxProfile::encode() so FireFoxProfile works for Windows Users as well

Some minor changes but this seems to have solved the issue that was raised in: https://github.com/facebook/php-webdriver/issues/165#.

There are some further possible improvements that can be made to encode() after extensive debugging of this function but I'll leave those open for another time. 
The comment is not correct.
Also, would you mind fixing the indentation? I am trying to get a Windows image to test it.