Work on a bridge over the Fife Circle Line will mean a path will be out of bounds to walkers for three months.