I need to be able to do two things in regards to files

1) open a file append 2 bytes to it and than save it as a file w/ a different
name.

2) I need to be able to extract the last two bytes of the altered version
of hte file I just created.

I'm pretty unsure of how to do this. Can anyone point me in the right direction?