miniprohex: Fix temporary file handling

Avoid insecure temporary file and drop it after use.
Improve diagnostics a bit

It could be tricky to determine the file size needed, especially for weirdly
sized devices.
Fix support for devices with irregular memory sizes

E.g. PIC12F675 has memory of 0x7fe size -- the last word is configuration word
that is handled separately.
Merge pull request #16 from lkundrak/lr-another-one

A couple more fixes