added write support for tag emulation, cleanup tagemulation class

Signed-off-by: Armin Wieser <armin.wieser@gmail.com>
Merge pull request #4 from awieser/master

added write support for tag emulation, cleanup tagemulation class