1.0.47.1: fix longstanding bug in os_get_runtime_executable_path on darwin
* in os_get_runtime_executable_path, we were wrongly assuming that
size would be set to the actual size of the string on a successful
call to NSGetExecutablePath. This isn't the case and we were
setting path[1025] = '\0'; causing things to break with XCode 4's
CLANG compiler.
* While we're at it, we should check to make that runtime_path is not
NULL before we free it, as there is a code path where we might end
up trying to free runtime_path when it was NULL but
saved_runtime_path was non-NULL.