Applied 3D-ES and bobc's fixes to the ftoa() function (see http://forums.reprap.org/read.php?340,293724).