rewrote signing section; this also fixes a bug where a wrong signature was created for the .dep files when pgp is used for signing.
Changed paths: