added correct choice of direction to ..._removecycles. consider marked edges
fixed bug in ..._detect_cycle and ..._removecycles. removed redundant if-clause in ..._createwalk