Added test and fix to prevent accidentally double encryption.
Merge pull request #6 from chucklam/double_encryption

Added test and fix to prevent accidental double encryption.