Disallow file operations on directories (RT #122358)

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