This Fixes #1115 : whitespace in notebook ID

White-space removed from the notebook id entered to load
@gordonwoodhull 
Thanks for the suggestion. Moving replace logic to following if block does not work in some cases as ponents.length is 1 if we load notebook by id not by url. So execution does not reach to if block because '/' is not present in notebook_or_url and length of penants variable is 1

Would it be fine if we put logic of gistname replace same as of today and for version keep inside if block?