Updated makefile and added savehist() to history.c