Change RWX permissions on created file

During stdout redirection, the created file was made
with execute permission which doesn't make any sense.