Add function for removing PKCS#7 padding