The biggest issues I can see with the 'bypass' line is that it appears to be based on someone looking at a map or perhaps google earth. No account of the topography or even elevation change from Inverkeithing to Halbeath. Anyone who's driven the M90 on that stretch will know that even today HGV's struggle up it.
That was my initial thought too. Theres a spot height in Crossgates at 118m, so from close to sea level at Inverkeithing thats an average of about 2% for a little over 5km.