Force codesign to overwrite old signature if present
Fixed application signing check for codesign.

Sometimes "codesign" returns error code 1 when replacing an already existing
signature.