Small addition to deal with spaces in tags.

Replace spaces with underscores before doing anything with tags as the service will do that anyway. This way we reduce the number of unneeded tag additions/deletions.