Added regex for command line args in decryptdir and cleaned up the code