[SPARK-2894] spark-shell doesn't accept flags

As @sryza reported, spark-shell doesn't accept any flags.
The root cause is wrong usage of spark-submit in spark-shell and it come to the surface by #1801
We should move this call before the `if` statement to cover the Cygwin branch. And please use 4-space indentation here :)