Looks like you should allow the user to provide the  screencapture path, or search for it, and check the output, because I'm getting this output:

```
: line 22: screencapture: command not found
```

Even when screencapture exists on the system, on: 

```
$ whereis screencapture
/usr/sbin/screencapture
```

But /usr/sbin isn't on the PATH for the bash shell executed by the payload (I'm using osx/x86/shell_reverse_tcp):

```
echo $PATH
/usr/gnu/bin:/usr/local/bin:/bin:/usr/bin:.
```