Only create asset folder when running as main script.

This commit makes it so that merely importing server.py doesn't cause the assets folder to be created, something which might be undesired in for example unit tests.