Don't print to stdout during test
Remove expectation for existing directory

The expectation only happened to work, because Dir.mktmpdir creates
directories with restrictive permissions. When an existing
directory is used the code doesn't change the permissions to the
expected restricted ones, so this check actually doesn't check any
code.
Move write call to shared before section
Merge branch 'fix_autoyast_test'

Pull request #468