update travis config

moved global npm installs to before script to avoid overwriting the install part
currently npm install didn't get called on Travis