fixing the check where forcesave makes sure its argument is a number
converting close-nicely from shell to ruby