Remove invalid and blank commands from command history. Start routines for reading history file.