add a chmod to the handle function

also take umask into account.

Signed-off-by: Thomas Warlop <thomas.warlop@gmail.com>