Improve color detection logic for prompt/ls/grep

Use tput properly and only when found and necessary