prettier warnings

Warning filenames replace the full cobra path with just cobra, allowing
the messages to fit on asingle line. Additionally, on posix systems,
ansi color excapes are used to color warning messages for increased
visibility.