XD-1136 Fixing failure in HDFS sink  when undeploying and redeploying a stream

- problem was that file names or directories containing numbers interfered with
   creation of new file with numeric suffix for the stream
Use XD job name for JobExecutionInfoResource

- The jobName of JobExecutionInfoResource should not have
  the default ".job" suffix we have for all the XD batch jobs.
  It is fine to have this jobName as is in JobExecutionInfo.
  Since the REST client domain resource should expose the
  actual job name we need to remove the ".job" suffix from it.
- Fixed the tests.
Make scripts more ubuntu-friendly

Following Janne's suggestions.
Also use echo "-e" to interpret newlines in messages.