fixing some problems with nano

Also added fallback for rare machines without screen-256color terminfo