Refactored builtins. Added dirhistory keyseqs for puTTY