Disallow file operations on directories

This prevents rakudo performing file operations on directories on
platforms where the OS itself does not disallow this.

This fixes RT #122358