Fixed OSX date math bug

OSX doesn’t like an “N” at the end of $(date +%s.%3N), so there is not
an if/then to get around this. Also did some trimming of lines with sed
to help with OSX issues. Also experimenting with uploading stats on
each bash run.