Use echo instead of cat - otherwise it should work. Cat reads out files and outputs them, but echo reads its arguments and outputs them.
Well, actually, you might need #!/system/bin/sh at the beginning of those files.
change the cat lines to this:
echo '#!/system/bin/sh' > /system/bin/sysrw...