Fix graphing test

Allow `cylc graph` to print plain graph to standard output if the output
file argument is a `-`.

Use single `perl` command to parse graphing result, instead of 2 `sed`
and a `perl`.
This causes most of my graph tests to fail, when the number of function args is just two, under bash 4.2.0(1)-release (2011).  I'm not sure if this is a feature or a bug in this version of bash (it works fine in an older version on another host).  Test case, ```foo.sh```:
```bash
#!/bin/bash
set -u
echo "no brackets -$@-"
echo "brackets -${@}-"
echo DONE
```
Result with an arg:
```
% ./foo.sh one
no brackets -one-
brackets -one-
DONE
```
Result without any args:
```
% ./foo.sh 
no brackets --
./foo.sh: line 4: @: unbound variable
```

So - could you change ```${@}``` to ```$@``` please?!