Fixing NullPointerException for when gricli scripts have extra whitespaces on the end of submit lines