Extract methods safe_rm and safe_ln_s in Rakefile