Updated permission handling. Script must be run as sudo on Ubuntu but script now automatically sets R/W permissions for user to be able to R/W.