tabs to spaces
CS fixes
ensure that the media path is created
Merge pull request #1 from lsmith77/media_tweaks

Thanks a lot!