Thanks for the hints, I finally managed to change the heap size for stand-alone PyS60 applications. Now I can take large photos (biggest 1.4MB in size) without any memory problems.
Please note that I noticed another problem with Ensymble: it was not able to cope with my base64 encoded private key in which it was NOT explicitly mentioned whether it was an RSA- or DSA-encoded key. In other words, it either expected
-----BEGIN DSA PRIVATE KEY-----
boundary, whereas mine was simply
-----BEGIN RSA PRIVATE KEY-----
-----BEGIN PRIVATE KEY-----
I'm not sure if the last format should always be defaulted to RSA, however, since mine was RSA-encoded (got from TrustCenter, btw) I adjusted cryptutil.py script so that it works the same way in the last two cases.