Fix issue #19. We should probably expose this to js instead so we can
provide history built-in functionality and allow users to specify the
history file path.