Make KRuntime build on OSX

It seems that, on OSX, you cannot run a bash script by ignoring its `.sh` extension. Moreover, we need to make the batchcopy script executable before running it.

@davidfowl  @troydai , please help to review and verify it doesn't break KRuntime build on Linux.