- Clean the framework target dir before re-packaging it.
- Allow overriding the lib name, lib target, and header and resource directories via environment variables set in the post-build script. This allows you to use different values than the project name. Also, the default directory (in Xcode 5.1 at least) for headers is not as is specified by default in the script (it's /usr/local/include). So, allow override to make it correctly copy the headers into the framework.