Remove leading&trailing whitespace, trailing ?>
Remove ?> at file ends to prevent premature outpout
Merge master branch from 'RandolfCarter/owncloud'