added missing copy method
fixed some file operation bugs

Signed-off-by: Sweil <mail@sweil.de>