Allow the use of write with status lines/progress bars

Write is useful when you wish to output multiple colours on a single line.
This commit allows write to be used for this purpose even when a status
line has been set. The status line will only be redisplayed after a call
to puts.
Add test for write with progress bar