You're probably aware of issue #329? Your case sounds a little different (as you said connections aren't dropped in all circumstances, but you should probably check the output of dmesg after a connection drop (if you have x-term installed). If you see similar errors as in the attachment in the bug, you should send your unit to Nokia for replacement.
where do you put the script? I couldn't really find an answer on http://stefans.datenbruch.de/nokia770/. Would it work to put it the if-ip-directory?