Refactor `utils` for general use

I modified the `utils` shell script in the following ways:

 * Make them more generalized so they can be re-used in other projects
 * The version number can be set manually rather than retrieved automatically from `git describe`
 * Displays an error message if the version number cannot be retrieved automatically
 * The `lib` folder is optional when compiling the SWC