enhance dyn mem processing and FIFO permissions

Now, for checks and memory values the mem addr is calculated with a
memory offset (the addr returned by malloc or 0).

Furthermore, FIFOs get 666 permission. This is needed as in many
distributions the "ptrace" syscall requires root permission. If
you already have to run the trainer as root, you don't want to run
the game as root, too.