Replace spaces in a string with #