Fix bertos copy command to work also on Mac OS, and exit when there is error. Use...