Added output file parameter to ipa_sign and cleaned up a bit to support relative pathnames