The argv argument may be modified on calls to exchange within the function and should not be const qualified (it's not true from the caller's point of view).
This change moves source files into a src/ directory,
and puts object files into an obj/ directory. The Makefile
and xcode project are updated accordingly.
Fixes#1866