Added test comparing file modes after copying an executable file, relates to #464

Preserve file mode on actions.template, fixes #464