I have noticed a fatal flaw with your htEdit script. Does aMember replicate the same problem? The htEdit script will create the .htpasswd and .htaccess in the same directory. It is necessary to manually change your apache.conf and move the .htpasswd to the new protected directory.
aMember and htEdit has no code relation, it is completely different scripts written in different programming languagues, so there can be common bugs. Anyway, there is no such bug in htEdit as you describe, I guess there is little misunderstanding.