added beam file writing functionality

Hi Indranil,

Here are two functions that I use in my work to write zemax beam files. They're not technically accessing the ZDDE, but they may be useful to others.
In PyZDDE, I am using the convention of using negative numbers for indicating errors (mostly because Zemax also sends some high negative numbers for indicating errors). For example: 

```
-999: file could not be loaded (check if the file really exists, or check the path.
 -998: the command timed out
```

So I would recommend that this function also returns some high negative numbers like -997, -996, and -995