+ cwd[] should be MAXPATHLEN bytes long
+ if you want people to use it, you need to put some license on it. GPL and ISC (simplified BSD) are good choices.
+ you may wish to consider asprintf() and err() (both of which elegantly solve a problem that leif has pointed out). These functions are non-POSIX but widely supported and easily portable. (You can also learn how to use the autotools to handle OSes that do not have these functions.)
+ getopt_long() may be easier than parsing parameters "by hand", especially once your utility grows more parameters.
+ hardcoding the colours is ok for now, but you should really use terminfo to find the appropriate escape sequence. The "magic word" for setting the foreground colour is "setaf"; you may wish to look at terminfo(3) and the source code for tput, if your OS has that utility. Warning: proper terminal handling is complex.