Separated the function to write a JSAMPLE array to
a JPEG image. This is useful later, because I will
have input arrays of various types and their conversion
to JSAMPLE array can be done separately. Then all can
call this function to write the JSAMPLE array.

Removed the positive check on the extention, ibord
and obord input parameters. It is now changed to a
check to see if it is non-negative, zero is allowed.
Corrected borderes in CMYK.

Corrected program name in Makefile.

Removed else if() from fminmax, because it failed
to find the minimum in an ordered array.