Updated to select correct applet and file for given identity for sign/decrypt

Added more debugging for selecting a key for sign/decrypt