As far as possible, make script OS agnostic.

Changed mv, rm and mkdir commands to utilise FileUtils.